var EDJXConfirmer = {
    default_time_out: 1800,
    default_styling: 'right: 0px; top: 0px; width: 200px; position: fixed; margin: 0px 0px 0px 0px; padding: 10px 25px 10px 10px; text-align: center; background-attachment: scroll; background-clip: border-box; border-bottom-style: solid; border-bottom-width: 1px; color: #000000; display: block; height: 20px; font-weight: bold;  display: none; visibility: hidden;',
    init: function() {
	okitem = document.createElement('div');
	okitem.setAttribute('style', 'background-color: #CFC; border-bottom-color: #00ff00; z-index: 10001; ' + EDJXConfirmer.default_styling);
	okitem.setAttribute('id', 'ok_pop_up_top');
	okitem.innerHTML = '<span style="font-style: italic;"><img src="/img/ok.png" alt="OK!"/></span>';
	document.getElementsByTagName('body')[0].appendChild(okitem);
	nokitem = document.createElement('div');
	nokitem.setAttribute('style', 'background-color: #FCC; border-bottom-color: #ff0000; z-index: 10002; ' + EDJXConfirmer.default_styling);
	nokitem.setAttribute('id', 'nok_pop_up_top');
	nokitem.innerHTML = '<span style="font-style: italic;">Whoops! <img src="/img/not_ok.png" alt="NOK!"/></span>';
	document.getElementsByTagName('body')[0].appendChild(nokitem);
    },
    show_ok: function() {
	var ok_item = document.getElementById('ok_pop_up_top');
	var nok_item = document.getElementById('nok_pop_up_top');
	ok_item.style.display = 'inline';
	ok_item.style.visibility = 'visible';
	setTimeout('EDJXConfirmer.timeout_ok()', EDJXConfirmer.default_time_out);
    },
    show_nok: function() {
	var ok_item = document.getElementById('ok_pop_up_top');
	var nok_item = document.getElementById('nok_pop_up_top');
	nok_item.style.display = 'inline';
	nok_item.style.visibility = 'visible';
	setTimeout('EDJXConfirmer.timeout_nok()', EDJXConfirmer.default_time_out);
    },
    timeout_ok: function() {
	var ok_item = document.getElementById('ok_pop_up_top');
	var nok_item = document.getElementById('nok_pop_up_top');
	ok_item.style.display = 'none';
	ok_item.style.visibility = 'hidden';
    },
    timeout_nok: function() {
	var ok_item = document.getElementById('ok_pop_up_top');
	var nok_item = document.getElementById('nok_pop_up_top');
	nok_item.style.display = 'none';
	nok_item.style.visibility = 'hidden';
    }
};

EDJXConfirmer.init();